﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<meta charset="utf-8" />
	<title>上传文件</title>
	<meta name="Keywords" content="17玩芽-上传文件" />
	<meta name="Description" content="17玩芽-上传文件" />
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
	<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
	<!-- Mobile Devices Support @begin -->
	<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
	<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
	<meta content="no-cache" http-equiv="pragma">
	<meta content="0" http-equiv="expires">
	<meta content="telephone=no, address=no" name="format-detection">
	<meta name="apple-mobile-web-app-capable" content="yes" /> <!-- apple devices fullscreen -->
	<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
	<!-- Mobile Devices Support @end -->
</head>
<script type="text/javascript">
	function preview(){
		var x = document.getElementById("production_url");
		alert(x.value);
		if(!x || !x.value) return;
		var patn = /\.jpg$|\.jpeg$|\.gif$/i;
		if(patn.test(x.value)){
			var y = document.getElementById("img5");
			if(y){
				y.src = 'file://localhost/' + x.value;
			}else{
				var img=document.createElement('img');
				img.setAttribute('src','file://localhost/'+x.value);
				img.setAttribute('width','120');
				img.setAttribute('height','90');
				img.setAttribute('id','img5');
				document.getElementById('nick').appendChild(img);
			}
		}else{
			alert("您选择的似乎不是图像文件。");
		}
	}
</script>
<center>
	<form action="./confirmUpload.php" method="post" name="joinus" enctype="multipart/form-data">
		<body ondragstart="return false;width:100%">
			<div class="foot" style="-webkit-transform:translate3d(0,0,0);width:100%;margin-top:0px;">
				<input type="hidden" name="sub_activity_id" value="<?php echo($sub_activity_id);?>"/>
				<input type="hidden" name="uid" value="<?php echo($uid);?>"/>
				<input type="hidden" name="activity_id" value="<?php echo($activity_id);?>"/>
				<img  style="width: 100px;width: 100px;"  src="<?php echo($userSimpleInfo['head_img_url']);?>" title="<?php echo($userSimpleInfo['nickname']);?>"/><br>


				<br><label id="nick"><?php echo($userSimpleInfo['nickname']);?></label><br>

				选择文件<input type="file" id="production_url" name="production_url" onchange="preview()" />
				<br/><br>
				<input name="production_explain" type="text"/><button type="submit">发送</button>
			</div>
		</body>
	</form>
</center>
</html>